﻿//
// Decompiled with: Decompiler.NET, Version=1.3.1.18439, Culture=neutral, PublicKeyToken=null, Version: 1.3.1.18439
// Decompilation Started at: 3/15/2009 10:34:26 PM
// Copyright 2003 - 2004, Jungle Creatures, Inc., All Rights Reserved. 
// Written by Jonathan Pierce, Email: support@junglecreatures.com
//

namespace PatientManagement

{
		
		#region Namespace Import Declarations
		
			using DucLinhControls;
			using System.ComponentModel;
			using System.Data.Common;
			using System.Data;
			using System.Data.SqlClient;
			using System.Diagnostics;
			using System.Drawing;
			using System;
			using System.Net;
			using System.Resources;
			using System.Windows.Forms;
			
		#endregion
		
	public class frmMain : Form
	
	{
		
		#region Fields
			public ToolBarButton btnBaoCao;
			private ToolBarButton btnGiupDo;
			public ToolBarButton btnLapBenhAnMoi;
			public ToolBarButton btnTimHSBenhAn;
			private IContainer components;
			private string connStr;
			public ContextMenu contextMenu1;
			public MenuItem ctmCuoiThang;
			public MenuItem ctmTheoBacSi;
			public MenuItem ctmTheoLoaiBenh;
			private DucLinhXPMenu ducLinhXPMenu1;
			private DucLinhXPToolBar ducLinhXPToolBar1;
			private frmAds fAds;
			private frmBackupSchedule fBackupSchedule;
			private frmBaoCaoCuoiNgay fBaoCaoCuoiNgay;
			private frmBenhAnChuaTinhTien fBenhAnChuaTinhTien;
			private frmCapNhatNhanVien fCapNhatNhanVien;
			private frmCapNhatQuyen fCapNhatQuyen;
			public frmDangNhap fDangNhap;
			private frmDiagnoseSyptom fDiagnoseSyptom;
			private frmDoiMatKhau fDoiMatKhau;
			private frmEnterStock fEnterStock;
			private frmLapHoSoBenhAn fLapHoSoBenhAn;
			private frmLapHSBenhAnYTa fLapHSBenhAnYTa;
			private frmBANotCapThuoc fNotToa;
			private frmRestore fRestore;
			private frmSickList fSick;
			private frmUsedMedicine fStock;
			private frmThemNguoiTruyNhap fThemNguoiTruyNhap;
			private frmThemNhanVien fThemNhanVien;
			private frmTienIch fTienIch;
			private frmTimHoSoBenhAn fTimHoSoBenhAn;
			private frmNotToaThuoc fToaThuoc;
			private frmToaThuocMau fToaThuocMau;
			private frmTraceUpdateBill fTrace;
			private frmXetNghiem fXetNghiem;
			private frmXoaBenhAnh fXoaBA;
			private frmXoaHD fXoaHD;
			private ImageList imageList1;
			private MainMenu mainMenu1;
			private MenuItem menuItem1;
			private MenuItem menuItem2;
			private MenuItem menuItem3;
			private MenuItem menuItem4;
			private MenuItem menuItem5;
			private MenuItem menuItem6;
			private MenuItem menuItem8;
			private MenuItem mnuAbout;
			private MenuItem mnuBackup;
			public MenuItem mnuBaoCao;
			public MenuItem mnuBS;
			private MenuItem mnuCapNhatNhanVien;
			private MenuItem mnuCapNhatQuyen;
			public MenuItem mnuCapQuyen;
			public MenuItem mnuContent;
			public MenuItem mnuDangNhap;
			public MenuItem mnuDoiMatKhau;
			public MenuItem mnuDSThuoc;
			private MenuItem mnuDSXN;
			private MenuItem mnuFile;
			public MenuItem mnuHD;
			public MenuItem mnuHoaDon;
			public MenuItem mnuHuongDan;
			private MenuItem mnuHuyHD;
			public MenuItem mnuLapBenhAn;
			public MenuItem mnuLapBenhAnMoi;
			public MenuItem mnuLapToaThuoc;
			private MenuItem mnuLoiKhuyenThuPhauThuat;
			public MenuItem mnuMedicine;
			public MenuItem mnuNhanVien;
			public MenuItem mnuNhapThuoc;
			public MenuItem mnuQuyen;
			public MenuItem mnuThayDoi;
			private MenuItem mnuThemNguoiTruyNhap;
			private MenuItem mnuThemNhanVien;
			private MenuItem mnuThoat;
			public MenuItem mnuThuoc;
			public MenuItem mnuTienIch;
			public MenuItem mnuTimHSBenhAn;
			private MenuItem mnuTrace;
			private MenuItem mnuTrieuChungChanDoanNoiSoi;
			public MenuItem mnuXoaBenhAn;
		#endregion
		
		#region Constructors
		
			public frmMain ()
			
			{
				this.InitializeComponent ();
				this.connStr = Connection.ConnectionString ();
				return;
			}
			
		#endregion
		
		#region Methods
		
			private void ctmCuoiThang_Click (object sender, EventArgs e)
			
			{
				this.mnuMedicine_Click (sender, e);
				return;
			}
			
			private void ctmTheoBacSi_Click (object sender, EventArgs e)
			
			{
				this.mnuBS_Click (sender, e);
				return;
			}
			
			protected override void Dispose (bool disposing)
			
			{
				if (! disposing)
				{
					goto L_0016;
				}
				if (this.components == null)
				{
					goto L_0016;
				}
				this.components.Dispose ();
				
			L_0016:
				
				{
				}
				base.Dispose (disposing);
				return;
			}
			
			private void ducLinhXPToolBar1_ButtonClick (object sender, ToolBarButtonClickEventArgs e)
			
			{
				int i;
				i = this.ducLinhXPToolBar1.Buttons.IndexOf (e.Button);
				switch (i)
				{
					case 0:
					
					{
							goto L_002F;
					}
					case 1:
					
					{
							goto L_0039;
					}
					case 2:
					
					{
							goto L_004D;
					}
					case 3:
					
					{
							goto L_0043;
					}
				}
				goto L_004D;
				
			L_002F:
				
				{
				}
				this.mnuLapBenhAnMoi_Click (sender, ((EventArgs) e));
				goto L_004D;
				
			L_0039:
				
				{
				}
				this.mnuTimHSBenhAn_Click (sender, ((EventArgs) e));
				goto L_004D;
				
			L_0043:
				
				{
				}
				this.mnuContent_Click (sender, ((EventArgs) e));
				goto L_004D;
				
			L_004D:
				return;
			}
			
			private void frmMain_Load (object sender, EventArgs e)
			
			{
				this.ducLinhXPMenu1.AddPicture (this.mnuContent, 31);
				this.ducLinhXPMenu1.AddPicture (this.mnuDangNhap, 2);
				this.ducLinhXPMenu1.AddPicture (this.mnuThayDoi, 3);
				this.ducLinhXPMenu1.AddPicture (this.mnuDoiMatKhau, 4);
				this.ducLinhXPMenu1.AddPicture (this.mnuThoat, 1);
				this.ducLinhXPMenu1.AddPicture (this.mnuDSXN, 32);
				this.ducLinhXPMenu1.AddPicture (this.mnuLoiKhuyenThuPhauThuat, 25);
				this.ducLinhXPMenu1.AddPicture (this.mnuThemNguoiTruyNhap, 6);
				this.ducLinhXPMenu1.AddPicture (this.mnuCapNhatQuyen, 5);
				this.ducLinhXPMenu1.AddPicture (this.mnuXoaBenhAn, 24);
				this.ducLinhXPMenu1.AddPicture (this.mnuTrace, 29);
				this.ducLinhXPMenu1.AddPicture (this.mnuHuyHD, 28);
				this.ducLinhXPMenu1.AddPicture (this.mnuThemNhanVien, 14);
				this.ducLinhXPMenu1.AddPicture (this.mnuCapNhatNhanVien, 12);
				this.ducLinhXPMenu1.AddPicture (this.mnuBS, 19);
				this.ducLinhXPMenu1.AddPicture (this.mnuTrieuChungChanDoanNoiSoi, 23);
				this.ducLinhXPMenu1.AddPicture (this.mnuNhapThuoc, 33);
				this.ducLinhXPMenu1.AddPicture (this.mnuMedicine, 13);
				this.ducLinhXPMenu1.AddPicture (this.mnuLapBenhAnMoi, 16);
				this.ducLinhXPMenu1.AddPicture (this.mnuTimHSBenhAn, 17);
				this.ducLinhXPMenu1.AddPicture (this.ctmTheoBacSi, 15);
				this.ducLinhXPMenu1.AddPicture (this.ctmTheoLoaiBenh, 8);
				this.ducLinhXPMenu1.AddPicture (this.ctmCuoiThang, 13);
				this.ducLinhXPMenu1.Start (((Form) this));
				this.fDangNhap = new frmDangNhap (this);
				this.fDangNhap.ShowInTaskbar = false;
				DialogResult theDialogResult = this.fDangNhap.ShowDialog (((IWin32Window) this));
				return;
			}
			
			private void InitializeComponent ()
			
			{
				ResourceManager theResourceManager;
				MenuItem[] theMenuItemArray;
				MenuItem[] theMenuItemArray2;
				MenuItem[] theMenuItemArray3;
				MenuItem[] theMenuItemArray4;
				MenuItem[] theMenuItemArray5;
				MenuItem[] theMenuItemArray6;
				MenuItem[] theMenuItemArray7;
				MenuItem[] theMenuItemArray8;
				MenuItem[] theMenuItemArray9;
				MenuItem[] theMenuItemArray10;
				MenuItem[] theMenuItemArray11;
				MenuItem[] theMenuItemArray12;
				ToolBarButton[] theToolBarButtonArray;
				Control[] theControlArray;
				this.components = ((IContainer) new System.ComponentModel.Container ());
				theResourceManager = new ResourceManager (typeof (frmMain));
				this.mainMenu1 = new MainMenu ();
				this.mnuFile = new MenuItem ();
				this.mnuDangNhap = new MenuItem ();
				this.mnuThayDoi = new MenuItem ();
				this.menuItem3 = new MenuItem ();
				this.mnuDoiMatKhau = new MenuItem ();
				this.menuItem2 = new MenuItem ();
				this.mnuThoat = new MenuItem ();
				this.mnuLapBenhAn = new MenuItem ();
				this.mnuLapBenhAnMoi = new MenuItem ();
				this.menuItem5 = new MenuItem ();
				this.mnuLapToaThuoc = new MenuItem ();
				this.menuItem8 = new MenuItem ();
				this.mnuTimHSBenhAn = new MenuItem ();
				this.mnuHoaDon = new MenuItem ();
				this.mnuBaoCao = new MenuItem ();
				this.mnuBS = new MenuItem ();
				this.mnuMedicine = new MenuItem ();
				this.mnuCapQuyen = new MenuItem ();
				this.mnuNhanVien = new MenuItem ();
				this.mnuThemNhanVien = new MenuItem ();
				this.mnuCapNhatNhanVien = new MenuItem ();
				this.mnuQuyen = new MenuItem ();
				this.mnuThemNguoiTruyNhap = new MenuItem ();
				this.mnuCapNhatQuyen = new MenuItem ();
				this.mnuThuoc = new MenuItem ();
				this.mnuNhapThuoc = new MenuItem ();
				this.mnuDSThuoc = new MenuItem ();
				this.mnuHD = new MenuItem ();
				this.mnuTrace = new MenuItem ();
				this.mnuHuyHD = new MenuItem ();
				this.mnuXoaBenhAn = new MenuItem ();
				this.mnuTienIch = new MenuItem ();
				this.mnuDSXN = new MenuItem ();
				this.mnuLoiKhuyenThuPhauThuat = new MenuItem ();
				this.mnuTrieuChungChanDoanNoiSoi = new MenuItem ();
				this.menuItem6 = new MenuItem ();
				this.mnuBackup = new MenuItem ();
				this.mnuHuongDan = new MenuItem ();
				this.mnuContent = new MenuItem ();
				this.menuItem1 = new MenuItem ();
				this.mnuAbout = new MenuItem ();
				this.imageList1 = new ImageList (this.components);
				this.ctmTheoBacSi = new MenuItem ();
				this.ctmTheoLoaiBenh = new MenuItem ();
				this.ctmCuoiThang = new MenuItem ();
				this.menuItem4 = new MenuItem ();
				this.contextMenu1 = new System.Windows.Forms.ContextMenu ();
				this.ducLinhXPMenu1 = new DucLinhXPMenu (this.components);
				this.ducLinhXPToolBar1 = new DucLinhXPToolBar ();
				this.btnLapBenhAnMoi = new ToolBarButton ();
				this.btnTimHSBenhAn = new ToolBarButton ();
				this.btnBaoCao = new ToolBarButton ();
				this.btnGiupDo = new ToolBarButton ();
				base.SuspendLayout ();
				theMenuItemArray = new MenuItem[7];
				theMenuItemArray[0] = this.mnuFile;
				theMenuItemArray[1] = this.mnuLapBenhAn;
				theMenuItemArray[2] = this.mnuHoaDon;
				theMenuItemArray[3] = this.mnuBaoCao;
				theMenuItemArray[4] = this.mnuCapQuyen;
				theMenuItemArray[5] = this.mnuTienIch;
				theMenuItemArray[6] = this.mnuHuongDan;
				this.mainMenu1.MenuItems.AddRange (theMenuItemArray);
				this.mnuFile.Index = 0;
				theMenuItemArray2 = new MenuItem[6];
				theMenuItemArray2[0] = this.mnuDangNhap;
				theMenuItemArray2[1] = this.mnuThayDoi;
				theMenuItemArray2[2] = this.menuItem3;
				theMenuItemArray2[3] = this.mnuDoiMatKhau;
				theMenuItemArray2[4] = this.menuItem2;
				theMenuItemArray2[5] = this.mnuThoat;
				this.mnuFile.MenuItems.AddRange (theMenuItemArray2);
				this.mnuFile.Text = "File";
				this.mnuDangNhap.Index = 0;
				this.mnuDangNhap.MdiList = true;
				this.mnuDangNhap.OwnerDraw = true;
				this.mnuDangNhap.Text = "Đăng Nhập Hệ Thống";
				this.mnuDangNhap.Click += new EventHandler (this.mnuDangNhap_Click);
				this.mnuThayDoi.Index = 1;
				this.mnuThayDoi.OwnerDraw = true;
				this.mnuThayDoi.Text = "Thay Đổi Đăng Nhập";
				this.mnuThayDoi.Click += new EventHandler (this.mnuThayDoi_Click);
				this.menuItem3.Index = 2;
				this.menuItem3.Text = "-";
				this.mnuDoiMatKhau.Index = 3;
				this.mnuDoiMatKhau.OwnerDraw = true;
				this.mnuDoiMatKhau.Text = "Đổi Mật Khẩu";
				this.mnuDoiMatKhau.Click += new EventHandler (this.mnuDoiMatKhau_Click);
				this.menuItem2.Index = 4;
				this.menuItem2.Text = "-";
				this.mnuThoat.Index = 5;
				this.mnuThoat.OwnerDraw = true;
				this.mnuThoat.Shortcut = Shortcut.AltF4;
				this.mnuThoat.Text = "Thoát";
				this.mnuThoat.Click += new EventHandler (this.mnuThoat_Click);
				this.mnuLapBenhAn.Index = 1;
				theMenuItemArray3 = new MenuItem[5];
				theMenuItemArray3[0] = this.mnuLapBenhAnMoi;
				theMenuItemArray3[1] = this.menuItem5;
				theMenuItemArray3[2] = this.mnuLapToaThuoc;
				theMenuItemArray3[3] = this.menuItem8;
				theMenuItemArray3[4] = this.mnuTimHSBenhAn;
				this.mnuLapBenhAn.MenuItems.AddRange (theMenuItemArray3);
				this.mnuLapBenhAn.Text = "Bệnh Án";
				this.mnuLapBenhAnMoi.Index = 0;
				this.mnuLapBenhAnMoi.Shortcut = Shortcut.CtrlN;
				this.mnuLapBenhAnMoi.Text = "Lập Bệnh Án Mới";
				this.mnuLapBenhAnMoi.Click += new EventHandler (this.mnuLapBenhAnMoi_Click);
				this.menuItem5.Index = 1;
				this.menuItem5.Text = "-";
				this.mnuLapToaThuoc.Index = 2;
				this.mnuLapToaThuoc.Text = "Lập Toa Thuốc";
				this.mnuLapToaThuoc.Click += new EventHandler (this.mnuLapToaThuoc_Click);
				this.menuItem8.Index = 3;
				this.menuItem8.Text = "-";
				this.mnuTimHSBenhAn.Index = 4;
				this.mnuTimHSBenhAn.Shortcut = Shortcut.CtrlS;
				this.mnuTimHSBenhAn.Text = "Tìm Kiếm";
				this.mnuTimHSBenhAn.Click += new EventHandler (this.mnuTimHSBenhAn_Click);
				this.mnuHoaDon.Enabled = false;
				this.mnuHoaDon.Index = 2;
				this.mnuHoaDon.Text = "Hóa Đơn";
				this.mnuHoaDon.Click += new EventHandler (this.mnuHoaDon_Click);
				this.mnuBaoCao.Index = 3;
				theMenuItemArray4 = new MenuItem[2];
				theMenuItemArray4[0] = this.mnuBS;
				theMenuItemArray4[1] = this.mnuMedicine;
				this.mnuBaoCao.MenuItems.AddRange (theMenuItemArray4);
				this.mnuBaoCao.Text = "Báo Cáo";
				this.mnuBS.Index = 0;
				this.mnuBS.OwnerDraw = true;
				this.mnuBS.Text = "Tổng Thể";
				this.mnuBS.Click += new EventHandler (this.mnuBS_Click);
				this.mnuMedicine.Index = 1;
				this.mnuMedicine.Text = "Thống Kê Thuốc";
				this.mnuMedicine.Click += new EventHandler (this.mnuMedicine_Click);
				this.mnuCapQuyen.Index = 4;
				theMenuItemArray5 = new MenuItem[5];
				theMenuItemArray5[0] = this.mnuNhanVien;
				theMenuItemArray5[1] = this.mnuQuyen;
				theMenuItemArray5[2] = this.mnuThuoc;
				theMenuItemArray5[3] = this.mnuHD;
				theMenuItemArray5[4] = this.mnuXoaBenhAn;
				this.mnuCapQuyen.MenuItems.AddRange (theMenuItemArray5);
				this.mnuCapQuyen.Text = "Quản Lý";
				this.mnuNhanVien.Index = 0;
				theMenuItemArray6 = new MenuItem[2];
				theMenuItemArray6[0] = this.mnuThemNhanVien;
				theMenuItemArray6[1] = this.mnuCapNhatNhanVien;
				this.mnuNhanVien.MenuItems.AddRange (theMenuItemArray6);
				this.mnuNhanVien.Text = "Nhân Viên";
				this.mnuThemNhanVien.Index = 0;
				this.mnuThemNhanVien.OwnerDraw = true;
				this.mnuThemNhanVien.Text = "Thêm Nhân Viên";
				this.mnuThemNhanVien.Click += new EventHandler (this.mnuThemNhanVien_Click);
				this.mnuCapNhatNhanVien.Index = 1;
				this.mnuCapNhatNhanVien.OwnerDraw = true;
				this.mnuCapNhatNhanVien.Text = "Danh Sách Nhân Viên";
				this.mnuCapNhatNhanVien.Click += new EventHandler (this.mnuCapNhatNhanVien_Click);
				this.mnuQuyen.Index = 1;
				theMenuItemArray7 = new MenuItem[2];
				theMenuItemArray7[0] = this.mnuThemNguoiTruyNhap;
				theMenuItemArray7[1] = this.mnuCapNhatQuyen;
				this.mnuQuyen.MenuItems.AddRange (theMenuItemArray7);
				this.mnuQuyen.Text = "Quyền Truy Nhập";
				this.mnuThemNguoiTruyNhap.Index = 0;
				this.mnuThemNguoiTruyNhap.OwnerDraw = true;
				this.mnuThemNguoiTruyNhap.Text = "Thêm Người Truy Nhập";
				this.mnuThemNguoiTruyNhap.Click += new EventHandler (this.mnuThemNguoiTruyNhap_Click);
				this.mnuCapNhatQuyen.Index = 1;
				this.mnuCapNhatQuyen.OwnerDraw = true;
				this.mnuCapNhatQuyen.Text = "Cập Nhật Quyền";
				this.mnuCapNhatQuyen.Click += new EventHandler (this.mnuCapNhatQuyen_Click);
				this.mnuThuoc.Index = 2;
				theMenuItemArray8 = new MenuItem[2];
				theMenuItemArray8[0] = this.mnuNhapThuoc;
				theMenuItemArray8[1] = this.mnuDSThuoc;
				this.mnuThuoc.MenuItems.AddRange (theMenuItemArray8);
				this.mnuThuoc.Text = "Thuốc";
				this.mnuNhapThuoc.Index = 0;
				this.mnuNhapThuoc.OwnerDraw = true;
				this.mnuNhapThuoc.Text = "Nhập Thuốc";
				this.mnuNhapThuoc.Click += new EventHandler (this.mnuNhapThuoc_Click);
				this.mnuDSThuoc.Index = 1;
				this.mnuDSThuoc.Text = "Danh Sách Thuốc đã Sử Dụng";
				this.mnuDSThuoc.Click += new EventHandler (this.mnuDSThuoc_Click);
				this.mnuHD.Index = 3;
				theMenuItemArray9 = new MenuItem[2];
				theMenuItemArray9[0] = this.mnuTrace;
				theMenuItemArray9[1] = this.mnuHuyHD;
				this.mnuHD.MenuItems.AddRange (theMenuItemArray9);
				this.mnuHD.Text = "Hóa Đơn";
				this.mnuTrace.Index = 0;
				this.mnuTrace.OwnerDraw = true;
				this.mnuTrace.Text = "Cập Nhật";
				this.mnuTrace.Click += new EventHandler (this.mnuTrace_Click);
				this.mnuHuyHD.Index = 1;
				this.mnuHuyHD.OwnerDraw = true;
				this.mnuHuyHD.Text = "Hủy";
				this.mnuHuyHD.Click += new EventHandler (this.mnuHuyHoaDon_Click);
				this.mnuXoaBenhAn.Index = 4;
				this.mnuXoaBenhAn.OwnerDraw = true;
				this.mnuXoaBenhAn.Text = "Bệnh Án - Bệnh Nhân";
				this.mnuXoaBenhAn.Click += new EventHandler (this.mnuXoaBenhAn_Click);
				this.mnuTienIch.Index = 5;
				theMenuItemArray10 = new MenuItem[5];
				theMenuItemArray10[0] = this.mnuDSXN;
				theMenuItemArray10[1] = this.mnuLoiKhuyenThuPhauThuat;
				theMenuItemArray10[2] = this.mnuTrieuChungChanDoanNoiSoi;
				theMenuItemArray10[3] = this.menuItem6;
				theMenuItemArray10[4] = this.mnuBackup;
				this.mnuTienIch.MenuItems.AddRange (theMenuItemArray10);
				this.mnuTienIch.Text = "Tiện Ích";
				this.mnuDSXN.Index = 0;
				this.mnuDSXN.Text = "Danh Sách Xét Nghiệm";
				this.mnuDSXN.Click += new EventHandler (this.mnuDSXN_Click);
				this.mnuLoiKhuyenThuPhauThuat.Index = 1;
				this.mnuLoiKhuyenThuPhauThuat.Text = "Lời Khuyên - Thủ Thuật - Phẩu Thuật";
				this.mnuLoiKhuyenThuPhauThuat.Click += new EventHandler (this.mnuLoiKhuyenThuPhauThuat_Click);
				this.mnuTrieuChungChanDoanNoiSoi.Index = 2;
				this.mnuTrieuChungChanDoanNoiSoi.Text = "Triệu Chứng - Chẩn Đoán - Nội Soi";
				this.mnuTrieuChungChanDoanNoiSoi.Click += new EventHandler (this.mnuTrieuChungChanDoanNoiSoi_Click);
				this.menuItem6.Index = 3;
				this.menuItem6.Shortcut = Shortcut.CtrlM;
				this.menuItem6.Text = "Toa Thuốc Mẫu";
				this.menuItem6.Click += new EventHandler (this.menuItem6_Click);
				this.mnuBackup.Index = 4;
				this.mnuBackup.Text = "Backup";
				this.mnuBackup.Click += new EventHandler (this.mnuBackup_Click);
				this.mnuHuongDan.Index = 6;
				theMenuItemArray11 = new MenuItem[3];
				theMenuItemArray11[0] = this.mnuContent;
				theMenuItemArray11[1] = this.menuItem1;
				theMenuItemArray11[2] = this.mnuAbout;
				this.mnuHuongDan.MenuItems.AddRange (theMenuItemArray11);
				this.mnuHuongDan.Text = "Hướng Dẫn";
				this.mnuContent.Index = 0;
				this.mnuContent.OwnerDraw = true;
				this.mnuContent.Text = "Nội dung";
				this.mnuContent.Click += new EventHandler (this.mnuContent_Click);
				this.menuItem1.Index = 1;
				this.menuItem1.Text = "-";
				this.mnuAbout.Index = 2;
				this.mnuAbout.Text = "About HA Informatics, Ltd.";
				this.mnuAbout.Click += new EventHandler (this.mnuAbout_Click);
				this.imageList1.ColorDepth = ColorDepth.Depth8Bit;
				this.imageList1.ImageSize = new System.Drawing.Size (16, 16);
				this.imageList1.ImageStream = ((ImageListStreamer) theResourceManager.GetObject ("imageList1.ImageStream"));
				this.imageList1.TransparentColor = Color.Transparent;
				this.ctmTheoBacSi.Index = 0;
				this.ctmTheoBacSi.OwnerDraw = true;
				this.ctmTheoBacSi.Text = "Báo Cáo Tổng Thể";
				this.ctmTheoBacSi.Click += new EventHandler (this.ctmTheoBacSi_Click);
				this.ctmTheoLoaiBenh.Index = -1;
				this.ctmTheoLoaiBenh.Text = "";
				this.ctmCuoiThang.Index = 1;
				this.ctmCuoiThang.OwnerDraw = true;
				this.ctmCuoiThang.Text = "Thống Kê Thuốc";
				this.ctmCuoiThang.Click += new EventHandler (this.ctmCuoiThang_Click);
				this.menuItem4.Index = -1;
				this.menuItem4.Text = "]";
				theMenuItemArray12 = new MenuItem[2];
				theMenuItemArray12[0] = this.ctmTheoBacSi;
				theMenuItemArray12[1] = this.ctmCuoiThang;
				this.contextMenu1.MenuItems.AddRange (theMenuItemArray12);
				this.ducLinhXPMenu1.ImageList = this.imageList1;
				this.ducLinhXPToolBar1.Appearance = ToolBarAppearance.Flat;
				theToolBarButtonArray = new ToolBarButton[4];
				theToolBarButtonArray[0] = this.btnLapBenhAnMoi;
				theToolBarButtonArray[1] = this.btnTimHSBenhAn;
				theToolBarButtonArray[2] = this.btnBaoCao;
				theToolBarButtonArray[3] = this.btnGiupDo;
				this.ducLinhXPToolBar1.Buttons.AddRange (theToolBarButtonArray);
				this.ducLinhXPToolBar1.ContextMenu = this.contextMenu1;
				this.ducLinhXPToolBar1.DropDownArrows = true;
				this.ducLinhXPToolBar1.ImageList = this.imageList1;
				this.ducLinhXPToolBar1.Name = "ducLinhXPToolBar1";
				this.ducLinhXPToolBar1.ShowToolTips = true;
				this.ducLinhXPToolBar1.Size = new System.Drawing.Size (654, 25);
				this.ducLinhXPToolBar1.TabIndex = 6;
				this.ducLinhXPToolBar1.ButtonClick += new ToolBarButtonClickEventHandler (this.ducLinhXPToolBar1_ButtonClick);
				this.btnLapBenhAnMoi.ImageIndex = 16;
				this.btnLapBenhAnMoi.ToolTipText = "Lập Bệnh Án Mới";
				this.btnTimHSBenhAn.ImageIndex = 17;
				this.btnTimHSBenhAn.ToolTipText = "Tìm Hồ Sơ Bệnh Án";
				this.btnBaoCao.DropDownMenu = ((System.Windows.Forms.Menu) this.contextMenu1);
				this.btnBaoCao.ImageIndex = 20;
				this.btnBaoCao.Style = ToolBarButtonStyle.DropDownButton;
				this.btnBaoCao.ToolTipText = "Báo Cáo";
				this.btnGiupDo.ImageIndex = 21;
				this.btnGiupDo.ToolTipText = "Giúp Đỡ";
				this.AutoScaleBaseSize = new System.Drawing.Size (7, 16);
				base.ClientSize = new System.Drawing.Size (654, 313);
				theControlArray = new Control[1];
				theControlArray[0] = ((Control) this.ducLinhXPToolBar1);
				base.Controls.AddRange (theControlArray);
				this.Font = new System.Drawing.Font ("Verdana", 9.75F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
				base.Icon = ((System.Drawing.Icon) theResourceManager.GetObject ("$this.Icon"));
				base.IsMdiContainer = true;
				base.Menu = this.mainMenu1;
				base.Name = "frmMain";
				base.StartPosition = FormStartPosition.CenterScreen;
				this.Text = "Chương trình quản lý bệnh nhân";
				base.WindowState = FormWindowState.Maximized;
				base.Load += new EventHandler (this.frmMain_Load);
				base.ResumeLayout (false);
				return;
			}
			
			[System.STAThreadAttribute ()]
			private static void Main ()
			
			{
				Application.Run (((Form) new frmMain ()));
				return;
			}
			
			private void menuItem6_Click (object sender, EventArgs e)
			
			{
				if ((this.fToaThuocMau != null) && (this.fToaThuocMau.flag != 0))
				{
					goto L_0039;
				}
				
			L_0015:
				
				{
				}
				this.fToaThuocMau = new frmToaThuocMau ();
				this.fToaThuocMau.MdiParent = ((Form) this);
				this.fToaThuocMau.Show ();
				goto L_0044;
				
			L_0039:
				
				{
				}
				this.fToaThuocMau.Activate ();
				
			L_0044:
				return;
			}
			
			private void mnuAbout_Click (object sender, EventArgs e)
			
			{
				if (this.fAds != null)
				{
					goto L_001E;
				}
				this.fAds = new frmAds ();
				this.fAds.Show ();
				
			L_001E:
				
				{
				}
				if (this.fAds.flag != 0)
				{
					goto L_0041;
				}
				this.fAds = new frmAds ();
				this.fAds.Show ();
				
			L_0041:
				
				{
				}
				if (this.fAds.flag != 1)
				{
					goto L_005A;
				}
				this.fAds.Activate ();
				
			L_005A:
				return;
			}
			
			private void mnuBackup_Click (object sender, EventArgs e)
			
			{
				int i;
				SqlConnection theSqlConnection;
				SqlCommand theSqlCommand;
				SqlDataAdapter theSqlDataAdapter;
				DataSet theDataSet;
				int i2;
				i = 0;
				theSqlConnection = new SqlConnection (this.connStr);
				theSqlCommand = new SqlCommand ("EXEC sp_helpserver", theSqlConnection);
				theSqlDataAdapter = new SqlDataAdapter (theSqlCommand);
				theDataSet = new DataSet ();
				int i3 = theSqlDataAdapter.Fill (theDataSet, "ServerName");
				i2 = 0;
				goto L_0085;
				
			L_003B:
				
				{
				}
				if (theDataSet.Tables[0].Rows[0]["name"].ToString ().ToUpper () != SystemInformation.ComputerName.ToString ().ToUpper ())
				{
					goto L_007F;
				}
				i = 1;
				
			L_007F:
				
				{
				}
				i2++;
				
			L_0085:
				
				{
				}
				if (i2 < theDataSet.Tables[0].Rows.Count)
				{
					goto L_003B;
				}
				theSqlConnection.Close ();
				theDataSet.Dispose ();
				if (i != 0)
				{
					goto L_00C2;
				}
				DialogResult theDialogResult = MessageBox.Show ("Chỉ có server mới sử dụng được chức năng này", "Information");
				goto L_00F9;
				
			L_00C2:
				
				{
				}
				if (this.fBackupSchedule != null)
				{
					goto L_00EE;
				}
				this.fBackupSchedule = new frmBackupSchedule ();
				this.fBackupSchedule.MdiParent = ((Form) this);
				this.fBackupSchedule.Show ();
				goto L_00F9;
				
			L_00EE:
				
				{
				}
				this.fBackupSchedule.Activate ();
				
			L_00F9:
				return;
			}
			
			private void mnuBS_Click (object sender, EventArgs e)
			
			{
				if (this.fBaoCaoCuoiNgay != null)
				{
					goto L_002A;
				}
				this.fBaoCaoCuoiNgay = new frmBaoCaoCuoiNgay ();
				this.fBaoCaoCuoiNgay.MdiParent = ((Form) this);
				this.fBaoCaoCuoiNgay.Show ();
				
			L_002A:
				
				{
				}
				if (this.fBaoCaoCuoiNgay.flag != 0)
				{
					goto L_0059;
				}
				this.fBaoCaoCuoiNgay = new frmBaoCaoCuoiNgay ();
				this.fBaoCaoCuoiNgay.MdiParent = ((Form) this);
				this.fBaoCaoCuoiNgay.Show ();
				
			L_0059:
				
				{
				}
				if (this.fBaoCaoCuoiNgay.flag != 1)
				{
					goto L_0072;
				}
				this.fBaoCaoCuoiNgay.Activate ();
				
			L_0072:
				return;
			}
			
			private void mnuCapNhatNhanVien_Click (object sender, EventArgs e)
			
			{
				if (this.fCapNhatNhanVien != null)
				{
					goto L_002A;
				}
				this.fCapNhatNhanVien = new frmCapNhatNhanVien ();
				this.fCapNhatNhanVien.MdiParent = ((Form) this);
				this.fCapNhatNhanVien.Show ();
				
			L_002A:
				
				{
				}
				if (this.fCapNhatNhanVien.flag != 0)
				{
					goto L_0059;
				}
				this.fCapNhatNhanVien = new frmCapNhatNhanVien ();
				this.fCapNhatNhanVien.MdiParent = ((Form) this);
				this.fCapNhatNhanVien.Show ();
				
			L_0059:
				
				{
				}
				if (this.fCapNhatNhanVien.flag != 1)
				{
					goto L_0072;
				}
				this.fCapNhatNhanVien.Activate ();
				
			L_0072:
				return;
			}
			
			private void mnuCapNhatQuyen_Click (object sender, EventArgs e)
			
			{
				if (this.fCapNhatQuyen != null)
				{
					goto L_002A;
				}
				this.fCapNhatQuyen = new frmCapNhatQuyen ();
				this.fCapNhatQuyen.MdiParent = ((Form) this);
				this.fCapNhatQuyen.Show ();
				
			L_002A:
				
				{
				}
				if (this.fCapNhatQuyen.flag != 0)
				{
					goto L_0059;
				}
				this.fCapNhatQuyen = new frmCapNhatQuyen ();
				this.fCapNhatQuyen.MdiParent = ((Form) this);
				this.fCapNhatQuyen.Show ();
				
			L_0059:
				
				{
				}
				if (this.fCapNhatQuyen.flag != 1)
				{
					goto L_0072;
				}
				this.fCapNhatQuyen.Activate ();
				
			L_0072:
				return;
			}
			
			private void mnuContent_Click (object sender, EventArgs e)
			
			{
				string theString;
				theString = Application.StartupPath;
				Process theProcess = Process.Start (string.Concat (theString, "/PMHelp.chm"));
				return;
			}
			
			private void mnuDangNhap_Click (object sender, EventArgs e)
			
			{
				this.frmMain_Load (sender, e);
				return;
			}
			
			private void mnuDoiMatKhau_Click (object sender, EventArgs e)
			
			{
				if (this.fDoiMatKhau != null)
				{
					goto L_002A;
				}
				this.fDoiMatKhau = new frmDoiMatKhau ();
				this.fDoiMatKhau.MdiParent = ((Form) this);
				this.fDoiMatKhau.Show ();
				
			L_002A:
				
				{
				}
				if (this.fDoiMatKhau.flag != 0)
				{
					goto L_0059;
				}
				this.fDoiMatKhau = new frmDoiMatKhau ();
				this.fDoiMatKhau.MdiParent = ((Form) this);
				this.fDoiMatKhau.Show ();
				
			L_0059:
				
				{
				}
				if (this.fDoiMatKhau.flag != 1)
				{
					goto L_0072;
				}
				this.fDoiMatKhau.Activate ();
				
			L_0072:
				return;
			}
			
			private void mnuDSThuoc_Click (object sender, EventArgs e)
			
			{
				string theString;
				SqlConnection theSqlConnection;
				SqlDataAdapter theSqlDataAdapter;
				DataSet theDataSet;
				theString = Connection.ConnectionString ();
				if ((this.fStock != null) && (this.fStock.flag != 0))
				{
					goto L_00AF;
				}
				
			L_001E:
				
				{
				}
				theSqlConnection = new SqlConnection (theString);
				theSqlDataAdapter = new SqlDataAdapter ("Select Top 1 mimID from vw_MedicineStock", theSqlConnection);
				theDataSet = new DataSet ();
				int i = theSqlDataAdapter.Fill (theDataSet, "vw_MedicineStock");
				if ((theDataSet != null) && ((theDataSet.Tables.Count != 0) && (theDataSet.Tables[0].Rows.Count != 0)))
				{
					goto L_0081;
				}
				
			L_006C:
				
				{
				}
				DialogResult theDialogResult = MessageBox.Show ("Kho thuốc rỗng", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				goto L_00C8;
				
			L_0081:
				
				{
				}
				this.fStock = new frmUsedMedicine ();
				this.fStock.MdiParent = ((Form) this);
				this.fStock.Show ();
				theSqlDataAdapter.Dispose ();
				theSqlConnection.Close ();
				
			L_00AF:
				
				{
				}
				if (this.fStock.flag != 1)
				{
					goto L_00C8;
				}
				this.fStock.Activate ();
				
			L_00C8:
				return;
			}
			
			private void mnuDSXN_Click (object sender, EventArgs e)
			
			{
				if ((this.fXetNghiem != null) && (this.fXetNghiem.flag != 0))
				{
					goto L_0037;
				}
				
			L_0015:
				
				{
				}
				this.fXetNghiem = new frmXetNghiem ();
				this.fXetNghiem.MdiParent = ((Form) this);
				this.fXetNghiem.Show ();
				
			L_0037:
				return;
			}
			
			private void mnuHoaDon_Click (object sender, EventArgs e)
			
			{
				string theString;
				SqlDataAdapter theSqlDataAdapter;
				DataSet theDataSet;
				if ((this.fBenhAnChuaTinhTien != null) && (this.fBenhAnChuaTinhTien.flag != 0))
				{
					goto L_00A8;
				}
				
			L_0018:
				
				{
				}
				theString = Connection.ConnectionString ();
				theSqlDataAdapter = new SqlDataAdapter ("SELECT Top 1 patISN FROM Patients", theString);
				theDataSet = new DataSet ();
				int i = theSqlDataAdapter.Fill (theDataSet, "Patients");
				if ((theDataSet != null) && ((theDataSet.Tables.Count != 0) && (theDataSet.Tables[0].Rows.Count != 0)))
				{
					goto L_007A;
				}
				
			L_0065:
				
				{
				}
				DialogResult theDialogResult = MessageBox.Show ("Hiện chưa bệnh án nào tồn tại!", "Không tìm thấy bệnh án", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				goto L_00C1;
				
			L_007A:
				
				{
				}
				theDataSet.Clear ();
				theSqlDataAdapter.Dispose ();
				this.fBenhAnChuaTinhTien = new frmBenhAnChuaTinhTien ();
				this.fBenhAnChuaTinhTien.MdiParent = ((Form) this);
				this.fBenhAnChuaTinhTien.Show ();
				
			L_00A8:
				
				{
				}
				if (this.fBenhAnChuaTinhTien.flag != 1)
				{
					goto L_00C1;
				}
				this.fBenhAnChuaTinhTien.Activate ();
				
			L_00C1:
				return;
			}
			
			private void mnuHuyHoaDon_Click (object sender, EventArgs e)
			
			{
				string theString;
				SqlDataAdapter theSqlDataAdapter;
				DataSet theDataSet;
				SqlDataAdapter theSqlDataAdapter2;
				DataSet theDataSet2;
				string theString2;
				SqlDataAdapter theSqlDataAdapter3;
				DataSet theDataSet3;
				if (this.fXoaHD != null)
				{
					goto L_0108;
				}
				theString = Connection.ConnectionString ();
				theSqlDataAdapter = new SqlDataAdapter ("SELECT Top 1 patISN FROM Patients", theString);
				theDataSet = new DataSet ();
				int i = theSqlDataAdapter.Fill (theDataSet, "Patients");
				if ((theDataSet != null) && ((theDataSet.Tables.Count != 0) && (theDataSet.Tables[0].Rows.Count != 0)))
				{
					goto L_0070;
				}
				
			L_0058:
				
				{
				}
				DialogResult theDialogResult = MessageBox.Show ("Hiện chưa bệnh án nào tồn tại!", "Không tìm thấy bệnh án", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				goto L_01C5;
				
			L_0070:
				
				{
				}
				theDataSet.Clear ();
				theSqlDataAdapter.Dispose ();
				theSqlDataAdapter2 = new SqlDataAdapter ("Select Top 1 patISN from  vw_FullPayment", theString);
				theDataSet2 = new DataSet ();
				int i2 = theSqlDataAdapter2.Fill (theDataSet2, "vw_FullPayment");
				if ((theDataSet2 != null) && ((theDataSet2.Tables.Count != 0) && (theDataSet2.Tables[0].Rows.Count != 0)))
				{
					goto L_00E0;
				}
				
			L_00C8:
				
				{
				}
				DialogResult theDialogResult2 = MessageBox.Show ("Chưa có hóa đơn nào được thanh toán đầy đủ!", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				goto L_01C5;
				
			L_00E0:
				
				{
				}
				this.fXoaHD = new frmXoaHD ();
				this.fXoaHD.MdiParent = ((Form) this);
				this.fXoaHD.Show ();
				theSqlDataAdapter2.Dispose ();
				
			L_0108:
				
				{
				}
				if (this.fXoaHD.flag != 0)
				{
					goto L_01AC;
				}
				theString2 = Connection.ConnectionString ();
				theSqlDataAdapter3 = new SqlDataAdapter ("Select Top 1 patISN from  vw_FullPayment", theString2);
				theDataSet3 = new DataSet ();
				int i3 = theSqlDataAdapter3.Fill (theDataSet3, "vw_FullPayment");
				if ((theDataSet3 != null) && ((theDataSet3.Tables.Count != 0) && (theDataSet3.Tables[0].Rows.Count != 0)))
				{
					goto L_0183;
				}
				
			L_016E:
				
				{
				}
				DialogResult theDialogResult3 = MessageBox.Show ("Chưa có hóa đơn nào được thanh toán đầy đủ!", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				goto L_01C5;
				
			L_0183:
				
				{
				}
				this.fXoaHD = new frmXoaHD ();
				this.fXoaHD.MdiParent = ((Form) this);
				this.fXoaHD.Show ();
				theSqlDataAdapter3.Dispose ();
				
			L_01AC:
				
				{
				}
				if (this.fXoaHD.flag != 1)
				{
					goto L_01C5;
				}
				this.fXoaHD.Activate ();
				
			L_01C5:
				return;
			}
			
			private void mnuLapBenhAnMoi_Click (object sender, EventArgs e)
			
			{
				if (UserInformation.usrRole != "1")
				{
					goto L_0063;
				}
				if ((this.fLapHoSoBenhAn != null) && (this.fLapHoSoBenhAn.flag != 0))
				{
					goto L_0048;
				}
				
			L_0026:
				
				{
				}
				this.fLapHoSoBenhAn = new frmLapHoSoBenhAn ();
				this.fLapHoSoBenhAn.MdiParent = ((Form) this);
				this.fLapHoSoBenhAn.Show ();
				
			L_0048:
				
				{
				}
				if (this.fLapHoSoBenhAn.flag != 1)
				{
					goto L_0061;
				}
				this.fLapHoSoBenhAn.Activate ();
				
			L_0061:
				
				{
				}
				goto L_00B3;
				
			L_0063:
				
				{
				}
				if ((this.fLapHSBenhAnYTa != null) && (this.fLapHSBenhAnYTa.flag != 0))
				{
					goto L_009A;
				}
				
			L_0078:
				
				{
				}
				this.fLapHSBenhAnYTa = new frmLapHSBenhAnYTa ();
				this.fLapHSBenhAnYTa.MdiParent = ((Form) this);
				this.fLapHSBenhAnYTa.Show ();
				
			L_009A:
				
				{
				}
				if (this.fLapHSBenhAnYTa.flag != 1)
				{
					goto L_00B3;
				}
				this.fLapHSBenhAnYTa.Activate ();
				
			L_00B3:
				return;
			}
			
			private void mnuLapToaThuoc_Click (object sender, EventArgs e)
			
			{
				string theString;
				SqlDataAdapter theSqlDataAdapter;
				DataSet theDataSet;
				string theString2;
				SqlConnection theSqlConnection;
				SqlDataAdapter theSqlDataAdapter2;
				DataSet theDataSet2;
				if (UserInformation.usrRole != "3")
				{
					goto L_00DB;
				}
				if ((this.fNotToa != null) && (this.fNotToa.flag != 0))
				{
					goto L_00BD;
				}
				
			L_002C:
				
				{
				}
				theString = Connection.ConnectionString ();
				theSqlDataAdapter = new SqlDataAdapter ("SELECT Top 1 clrISN FROM vw_PatientHasPrescription", theString);
				theDataSet = new DataSet ();
				int i = theSqlDataAdapter.Fill (theDataSet, "vw_PatientHasPrescription");
				if ((theDataSet != null) && ((theDataSet.Tables.Count != 0) && (theDataSet.Tables["vw_PatientHasPrescription"].Rows.Count != 0)))
				{
					goto L_0095;
				}
				
			L_007D:
				
				{
				}
				DialogResult theDialogResult = MessageBox.Show ("Tất cả các toa đã được cấp!", "Không tìm thấy bệnh nhân chưa cấp toa thuốc", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				goto L_01AE;
				
			L_0095:
				
				{
				}
				this.fNotToa = new frmBANotCapThuoc ();
				this.fNotToa.MdiParent = ((Form) this);
				this.fNotToa.Show ();
				theSqlDataAdapter.Dispose ();
				
			L_00BD:
				
				{
				}
				if (this.fNotToa.flag != 1)
				{
					goto L_00D6;
				}
				this.fNotToa.Activate ();
				
			L_00D6:
				
				{
				}
				goto L_01AE;
				
			L_00DB:
				
				{
				}
				theString2 = Connection.ConnectionString ();
				if ((this.fToaThuoc != null) && (this.fToaThuoc.flag != 0))
				{
					goto L_0195;
				}
				
			L_00F9:
				
				{
				}
				theSqlConnection = new SqlConnection (theString2);
				theSqlDataAdapter2 = new SqlDataAdapter ("Select Top 1 patISN from  vw_SetUpPrescription", theSqlConnection);
				theDataSet2 = new DataSet ();
				int i2 = theSqlDataAdapter2.Fill (theDataSet2, "vw_SetUpPrescription");
				if ((theDataSet2 != null) && ((theDataSet2.Tables.Count != 0) && (theDataSet2.Tables[0].Rows.Count != 0)))
				{
					goto L_0165;
				}
				
			L_0150:
				
				{
				}
				DialogResult theDialogResult2 = MessageBox.Show ("Hiện tại chưa có bệnh nhân nào chưa có toa thuốc!", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				goto L_01AE;
				
			L_0165:
				
				{
				}
				this.fToaThuoc = new frmNotToaThuoc ();
				this.fToaThuoc.MdiParent = ((Form) this);
				this.fToaThuoc.Show ();
				theSqlDataAdapter2.Dispose ();
				theSqlConnection.Close ();
				
			L_0195:
				
				{
				}
				if (this.fToaThuoc.flag != 1)
				{
					goto L_01AE;
				}
				this.fToaThuoc.Activate ();
				
			L_01AE:
				return;
			}
			
			private void mnuLoiKhuyenThuPhauThuat_Click (object sender, EventArgs e)
			
			{
				if ((this.fTienIch != null) && (this.fTienIch.flag != 0))
				{
					goto L_0039;
				}
				
			L_0015:
				
				{
				}
				this.fTienIch = new frmTienIch ();
				this.fTienIch.MdiParent = ((Form) this);
				this.fTienIch.Show ();
				goto L_0044;
				
			L_0039:
				
				{
				}
				this.fTienIch.Activate ();
				
			L_0044:
				return;
			}
			
			private void mnuMedicine_Click (object sender, EventArgs e)
			
			{
				if ((this.fSick != null) && (this.fSick.flag != 0))
				{
					goto L_0037;
				}
				
			L_0015:
				
				{
				}
				this.fSick = new frmSickList ();
				this.fSick.MdiParent = ((Form) this);
				this.fSick.Show ();
				
			L_0037:
				
				{
				}
				if (this.fSick.flag != 1)
				{
					goto L_0050;
				}
				this.fSick.Activate ();
				
			L_0050:
				return;
			}
			
			private void mnuNhapThuoc_Click (object sender, EventArgs e)
			
			{
				if ((this.fEnterStock != null) && (this.fEnterStock.flag != 0))
				{
					goto L_0037;
				}
				
			L_0015:
				
				{
				}
				this.fEnterStock = new frmEnterStock ();
				this.fEnterStock.MdiParent = ((Form) this);
				this.fEnterStock.Show ();
				
			L_0037:
				
				{
				}
				if (this.fEnterStock.flag != 1)
				{
					goto L_0050;
				}
				this.fEnterStock.Activate ();
				
			L_0050:
				return;
			}
			
			private void mnuRestore_Click (object sender, EventArgs e)
			
			{
				if (this.fRestore != null)
				{
					goto L_002C;
				}
				this.fRestore = new frmRestore ();
				this.fRestore.MdiParent = ((Form) this);
				this.fRestore.Show ();
				goto L_0037;
				
			L_002C:
				
				{
				}
				this.fRestore.Activate ();
				
			L_0037:
				return;
			}
			
			private void mnuThayDoi_Click (object sender, EventArgs e)
			
			{
				int i;
				i = 0;
				goto L_0013;
				
			L_0004:
				
				{
				}
				base.MdiChildren[i].Close ();
				i = 0;
				
			L_0013:
				
				{
				}
				if (i < base.MdiChildren.Length)
				{
					goto L_0004;
				}
				this.frmMain_Load (sender, e);
				return;
			}
			
			private void mnuThemNguoiTruyNhap_Click (object sender, EventArgs e)
			
			{
				if (this.fThemNguoiTruyNhap != null)
				{
					goto L_002A;
				}
				this.fThemNguoiTruyNhap = new frmThemNguoiTruyNhap ();
				this.fThemNguoiTruyNhap.MdiParent = ((Form) this);
				this.fThemNguoiTruyNhap.Show ();
				
			L_002A:
				
				{
				}
				if (this.fThemNguoiTruyNhap.flag != 0)
				{
					goto L_0059;
				}
				this.fThemNguoiTruyNhap = new frmThemNguoiTruyNhap ();
				this.fThemNguoiTruyNhap.MdiParent = ((Form) this);
				this.fThemNguoiTruyNhap.Show ();
				
			L_0059:
				
				{
				}
				if (this.fThemNguoiTruyNhap.flag != 1)
				{
					goto L_0072;
				}
				this.fThemNguoiTruyNhap.Activate ();
				
			L_0072:
				return;
			}
			
			private void mnuThemNhanVien_Click (object sender, EventArgs e)
			
			{
				if (this.fThemNhanVien != null)
				{
					goto L_002A;
				}
				this.fThemNhanVien = new frmThemNhanVien ();
				this.fThemNhanVien.MdiParent = ((Form) this);
				this.fThemNhanVien.Show ();
				
			L_002A:
				
				{
				}
				if (this.fThemNhanVien.flag != 0)
				{
					goto L_0059;
				}
				this.fThemNhanVien = new frmThemNhanVien ();
				this.fThemNhanVien.MdiParent = ((Form) this);
				this.fThemNhanVien.Show ();
				
			L_0059:
				
				{
				}
				if (this.fThemNhanVien.flag != 1)
				{
					goto L_0072;
				}
				this.fThemNhanVien.Activate ();
				
			L_0072:
				return;
			}
			
			private void mnuThoat_Click (object sender, EventArgs e)
			
			{
				Application.Exit ();
				return;
			}
			
			private void mnuTimHSBenhAn_Click (object sender, EventArgs e)
			
			{
				string theString;
				SqlDataAdapter theSqlDataAdapter;
				DataSet theDataSet;
				if (UserInformation.usrRole == "3")
				{
					goto L_00CF;
				}
				if ((this.fTimHoSoBenhAn != null) && (this.fTimHoSoBenhAn.flag != 0))
				{
					goto L_00B6;
				}
				
			L_002C:
				
				{
				}
				theString = Connection.ConnectionString ();
				theSqlDataAdapter = new SqlDataAdapter ("SELECT Top 1 patISN FROM Patients", theString);
				theDataSet = new DataSet ();
				int i = theSqlDataAdapter.Fill (theDataSet, "Patients");
				if ((theDataSet != null) && ((theDataSet.Tables.Count != 0) && (theDataSet.Tables[0].Rows.Count != 0)))
				{
					goto L_008E;
				}
				
			L_0079:
				
				{
				}
				DialogResult theDialogResult = MessageBox.Show ("Hiện chưa bệnh nhân nào tồn tại!", "Không tìm thấy bệnh nhân", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				goto L_00CF;
				
			L_008E:
				
				{
				}
				this.fTimHoSoBenhAn = new frmTimHoSoBenhAn ();
				this.fTimHoSoBenhAn.MdiParent = ((Form) this);
				this.fTimHoSoBenhAn.Show ();
				theSqlDataAdapter.Dispose ();
				
			L_00B6:
				
				{
				}
				if (this.fTimHoSoBenhAn.flag != 1)
				{
					goto L_00CF;
				}
				this.fTimHoSoBenhAn.Activate ();
				
			L_00CF:
				return;
			}
			
			private void mnuTrace_Click (object sender, EventArgs e)
			
			{
				string theString;
				SqlDataAdapter theSqlDataAdapter;
				DataSet theDataSet;
				SqlDataAdapter theSqlDataAdapter2;
				SqlDataAdapter theSqlDataAdapter3;
				string theString2;
				SqlDataAdapter theSqlDataAdapter4;
				DataSet theDataSet2;
				SqlDataAdapter theSqlDataAdapter5;
				SqlDataAdapter theSqlDataAdapter6;
				if (this.fTrace != null)
				{
					goto L_013E;
				}
				theString = Connection.ConnectionString ();
				theSqlDataAdapter = new SqlDataAdapter ("Select top 1 invISN from  vw_UpdateInvoiceHistory ", theString);
				theDataSet = new DataSet ();
				int i = theSqlDataAdapter.Fill (theDataSet, "vw_UpdateInvoiceHistory");
				theSqlDataAdapter.Dispose ();
				if ((theDataSet != null) && ((theDataSet.Tables.Count != 0) && (theDataSet.Tables[0].Rows.Count != 0)))
				{
					goto L_0116;
				}
				
			L_0061:
				
				{
				}
				theSqlDataAdapter2 = new SqlDataAdapter ("Select top 1 invISN from  vw_UpdateInvoiceHistory where usnStatus = 0", theString);
				theDataSet.Clear ();
				int i2 = theSqlDataAdapter2.Fill (theDataSet, "vw_UpdateInvoiceHistory");
				theSqlDataAdapter2.Dispose ();
				if ((theDataSet != null) && ((theDataSet.Tables.Count != 0) && (theDataSet.Tables[0].Rows.Count != 0)))
				{
					goto L_0116;
				}
				
			L_00AE:
				
				{
				}
				theSqlDataAdapter3 = new SqlDataAdapter ("Select top 1 invISN from  vw_UserDeleteInvoice ", theString);
				theDataSet.Clear ();
				int i3 = theSqlDataAdapter3.Fill (theDataSet, "vw_UpdateInvoiceHistory");
				theSqlDataAdapter3.Dispose ();
				if ((theDataSet != null) && ((theDataSet.Tables.Count != 0) && (theDataSet.Tables[0].Rows.Count != 0)))
				{
					goto L_0116;
				}
				
			L_00FE:
				
				{
				}
				DialogResult theDialogResult = MessageBox.Show ("Chưa có người nào cập nhật hóa đơn!", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				goto L_029C;
				
			L_0116:
				
				{
				}
				this.fTrace = new frmTraceUpdateBill ();
				this.fTrace.MdiParent = ((Form) this);
				this.fTrace.Show ();
				theSqlDataAdapter.Dispose ();
				
			L_013E:
				
				{
				}
				if (this.fTrace.flag != 0)
				{
					goto L_0283;
				}
				theString2 = Connection.ConnectionString ();
				theSqlDataAdapter4 = new SqlDataAdapter ("Select Top 1 invISN from  vw_UpdateInvoiceHistory", theString2);
				theDataSet2 = new DataSet ();
				int i4 = theSqlDataAdapter4.Fill (theDataSet2, "vw_UpdateInvoiceHistory");
				if ((theDataSet2 != null) && ((theDataSet2.Tables.Count != 0) && (theDataSet2.Tables[0].Rows.Count != 0)))
				{
					goto L_025A;
				}
				
			L_01A7:
				
				{
				}
				theSqlDataAdapter5 = new SqlDataAdapter ("Select Top 1 invISN from  vw_UpdateInvoiceHistory where usnStatus = 0", theString2);
				theDataSet2.Clear ();
				int i5 = theSqlDataAdapter5.Fill (theDataSet2, "vw_UpdateInvoiceHistory");
				if ((theDataSet2 != null) && ((theDataSet2.Tables.Count != 0) && (theDataSet2.Tables[0].Rows.Count != 0)))
				{
					goto L_025A;
				}
				
			L_01F6:
				
				{
				}
				theSqlDataAdapter6 = new SqlDataAdapter ("Select Top 1 invISN from  vw_UserDeleteInvoice ", theString2);
				theDataSet2.Clear ();
				int i6 = theSqlDataAdapter6.Fill (theDataSet2, "vw_UpdateInvoiceHistory");
				if ((theDataSet2 != null) && ((theDataSet2.Tables.Count != 0) && (theDataSet2.Tables[0].Rows.Count != 0)))
				{
					goto L_025A;
				}
				
			L_0245:
				
				{
				}
				DialogResult theDialogResult2 = MessageBox.Show ("Chưa có người nào cập nhật hóa đơn!", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				goto L_029C;
				
			L_025A:
				
				{
				}
				this.fTrace = new frmTraceUpdateBill ();
				this.fTrace.MdiParent = ((Form) this);
				this.fTrace.Show ();
				theSqlDataAdapter4.Dispose ();
				
			L_0283:
				
				{
				}
				if (this.fTrace.flag != 1)
				{
					goto L_029C;
				}
				this.fTrace.Activate ();
				
			L_029C:
				return;
			}
			
			private void mnuTrieuChungChanDoanNoiSoi_Click (object sender, EventArgs e)
			
			{
				if ((this.fDiagnoseSyptom != null) && (this.fDiagnoseSyptom.flag != 0))
				{
					goto L_0039;
				}
				
			L_0015:
				
				{
				}
				this.fDiagnoseSyptom = new frmDiagnoseSyptom ();
				this.fDiagnoseSyptom.MdiParent = ((Form) this);
				this.fDiagnoseSyptom.Show ();
				goto L_0044;
				
			L_0039:
				
				{
				}
				this.fDiagnoseSyptom.Activate ();
				
			L_0044:
				return;
			}
			
			private void mnuXoaBenhAn_Click (object sender, EventArgs e)
			
			{
				string theString;
				string theString2;
				SqlDataAdapter theSqlDataAdapter;
				DataSet theDataSet;
				string theString3;
				string theString4;
				SqlDataAdapter theSqlDataAdapter2;
				DataSet theDataSet2;
				if (this.fXoaBA != null)
				{
					goto L_009E;
				}
				theString = Connection.ConnectionString ();
				theString2 = "select Top 1 clrISN from vw_ClinicalRecord_Thao order by patISN";
				theSqlDataAdapter = new SqlDataAdapter (theString2, theString);
				theDataSet = new DataSet ();
				int i = theSqlDataAdapter.Fill (theDataSet, "vw_ClinicalRecord_Thao");
				if ((theDataSet != null) && ((theDataSet.Tables.Count != 0) && (theDataSet.Tables["vw_ClinicalRecord_Thao"].Rows.Count != 0)))
				{
					goto L_0076;
				}
				
			L_005E:
				
				{
				}
				DialogResult theDialogResult = MessageBox.Show ("Hiện tại chưa có bệnh án", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				goto L_016E;
				
			L_0076:
				
				{
				}
				this.fXoaBA = new frmXoaBenhAnh ();
				this.fXoaBA.MdiParent = ((Form) this);
				this.fXoaBA.Show ();
				theSqlDataAdapter.Dispose ();
				
			L_009E:
				
				{
				}
				if (this.fXoaBA.flag != 0)
				{
					goto L_0155;
				}
				theString3 = Connection.ConnectionString ();
				theString4 = "select top 1 clrISN from vw_ClinicalRecord_Thao order by patISN";
				theSqlDataAdapter2 = new SqlDataAdapter (theString4, theString3);
				theDataSet2 = new DataSet ();
				int i2 = theSqlDataAdapter2.Fill (theDataSet2, "vw_ClinicalRecord_Thao");
				if ((theDataSet2 != null) && ((theDataSet2.Tables.Count != 0) && (theDataSet2.Tables["vw_ClinicalRecord_Thao"].Rows.Count != 0)))
				{
					goto L_012C;
				}
				
			L_010C:
				
				{
				}
				DialogResult theDialogResult2 = MessageBox.Show ("Hiện tại chưa có bệnh án", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				this.fXoaBA.Close ();
				goto L_016E;
				
			L_012C:
				
				{
				}
				this.fXoaBA = new frmXoaBenhAnh ();
				this.fXoaBA.MdiParent = ((Form) this);
				this.fXoaBA.Show ();
				theSqlDataAdapter2.Dispose ();
				
			L_0155:
				
				{
				}
				if (this.fXoaBA.flag != 1)
				{
					goto L_016E;
				}
				this.fXoaBA.Activate ();
				
			L_016E:
				return;
			}
			
			private bool validProduct ()
			
			{
				ModifyRegistry theModifyRegistry;
				string theString;
				string theString2;
				IPHostEntry theIPHostEntry;
				IPAddress[] theIPAddressArray;
				string theString3;
				string theString4;
				bool theBoolean;
				theModifyRegistry = new ModifyRegistry ();
				theString = theModifyRegistry.Read ("PM");
				theString2 = Dns.GetHostName ();
				theIPHostEntry = Dns.GetHostByName (theString2);
				theIPAddressArray = theIPHostEntry.AddressList;
				theString3 = theIPAddressArray[0].ToString ();
				theString4 = CryptoLib.DES.Encrypt (theString3).ToString ();
				if (theString != theString4)
				{
					goto L_0054;
				}
				theBoolean = true;
				goto L_0059;
				
			L_0054:
				
				{
				}
				theBoolean = false;
				goto L_0059;
				
			L_0059:
				
				{
				}
				return theBoolean;
			}
			
		#endregion
	}
	
}

